Portals Tutorial

From PreyWiki

Portals are one of Prey's main features and also one of the easiest to use. The following tutorial will teach you how to take advantage of the different portal techniques used throughout Prey.

Glowportals

Glowportals are the main type of portal used throughout Prey. We mainly used them as your main path portals. (Player needed to go through them to advance through the game.) They were represented by an obvious orange glow around the actual portal.

To place a glowportal in your map you will need to add an object_glowportal.

1. Right-Click in your grid view and move up to the Object menu. Browse through the object and click on object_glowportal.

2. Add another object_glowportal and this will serve as your destination.

3. Make sure that the portals are aligned with the floor. (Or whatever surface you want to align it to.) Glowportals can be angled to any surface, which means they can be sideways or upside down. The best way to make sure your portals are aligned is by selecting the Show Primitive Bounding Box tool from the toolbar.

Image:Portals2.jpg

After you’ve made this selection you will notice a bounding box appears around the portal object. You will want to align this box to whichever surface you want it to be on, which is the floor in this case.

4. Select your first portal and look under the Entity Class info in your Entity Browser. There are only 2 keys we are going to worry about in this tutorial. cameraTarget and startActive.

5. Click on the key entry and type cameraTarget. Under value you need to put the name of the destination portal. In this case it should be object_glowportal_2.

6. After you have the cameraTarget key/value assigned add a startActive key with a value of 1.

Image:Portals5.jpg

7. Your first portal is set up! Now you need to assign the same properties to your second portal, only with the cameraTarget being object_glowportal_1.

Rebuild your map and test it out! You now have a working glowportal.